home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  54.4 KB  |  1,457 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCE.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment (AOCE) Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __OCE__
  18. #define __OCE__
  19.  
  20. #ifndef REZ
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __ALIASES__
  25. #include <Aliases.h>
  26. #endif
  27. #ifndef __APPLEEVENTS__
  28. #include <AppleEvents.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53. /* All utility routines defined here are callable at interrupt level. */
  54. typedef unsigned short                     OCERecordTypeIndex;
  55. typedef unsigned short                     OCEAttributeTypeIndex;
  56. /* For anyone who absolutely needs a define of the body of the standard record or
  57. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  58. in character set 'smRoman'.  If you try to compare these to some RString or
  59. AttributeType variable, you must take the character set code into account.  Future
  60. standard types may be defined using character sets other than 'smRoman'. */
  61.  
  62. /* All these standard definitions begin with the Apple symbol (not shown here).
  63.  
  64. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  65. with the proper index.  These routines return pointers to the standard type.
  66. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  67. use global data can also use these. */
  68. /* Indices for the standard definitions for certain record types (OCERecordTypeIndex): */
  69.  
  70. enum {
  71.     kUserRecTypeNum                = 1,                            /* "User" */
  72.     kGroupRecTypeNum            = 2,                            /* "Group" */
  73.     kMnMRecTypeNum                = 3,                            /* "AppleMail™ M&M" */
  74.     kMnMForwarderRecTypeNum        = 4,                            /* "AppleMail™ Fwdr" */
  75.     kNetworkSpecRecTypeNum        = 5,                            /* "NetworkSpec" */
  76.     kADAPServerRecTypeNum        = 6,                            /* "ADAP Server" */
  77.     kADAPDNodeRecTypeNum        = 7,                            /* "ADAP DNode" */
  78.     kADAPDNodeRepRecTypeNum        = 8,                            /* "ADAP DNode Rep" */
  79.     kServerSetupRecTypeNum        = 9,                            /* "Server Setup" */
  80.     kDirectoryRecTypeNum        = 10,                            /* "Directory" */
  81.     kDNodeRecTypeNum            = 11,                            /* "DNode" */
  82.     kSetupRecTypeNum            = 12,                            /* "Setup" */
  83.     kMSAMRecTypeNum                = 13,                            /* "MSAM" */
  84.     kDSAMRecTypeNum                = 14,                            /* "DSAM" */
  85.     kAttributeValueRecTypeNum    = 15,                            /* "Attribute Value" */
  86.     kBusinessCardRecTypeNum        = 16,                            /* "Business Card" */
  87.     kMailServiceRecTypeNum        = 17,                            /* "Mail Service" */
  88.     kCombinedRecTypeNum            = 18,                            /* "Combined" */
  89.     kOtherServiceRecTypeNum        = 19,                            /* "Other Service" */
  90.     kAFPServiceRecTypeNum        = 20,                            /* "Other Service afps" */
  91.     kFirstOCERecTypeNum            = kUserRecTypeNum,                /* first standard OCE record type */
  92.     kLastOCERecTypeNum            = kAFPServiceRecTypeNum,        /* last standard OCE record type */
  93.     kNumOCERecTypes                = (kLastOCERecTypeNum - kFirstOCERecTypeNum + 1)
  94. };
  95.  
  96. /* Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): */
  97.  
  98. enum {
  99.     kMemberAttrTypeNum            = 1001,                            /* "Member" */
  100.     kAdminsAttrTypeNum            = 1002,                            /* "Administrators" */
  101.     kMailSlotsAttrTypeNum        = 1003,                            /* "mailslots" */
  102.     kPrefMailAttrTypeNum        = 1004,                            /* "pref mailslot" */
  103.     kAddressAttrTypeNum            = 1005,                            /* "Address" */
  104.     kPictureAttrTypeNum            = 1006,                            /* "Picture" */
  105.     kAuthKeyAttrTypeNum            = 1007,                            /* "auth key" */
  106.     kTelephoneAttrTypeNum        = 1008,                            /* "Telephone" */
  107.     kNBPNameAttrTypeNum            = 1009,                            /* "NBP Name" */
  108.     kQMappingAttrTypeNum        = 1010,                            /* "ForwarderQMap" */
  109.     kDialupSlotAttrTypeNum        = 1011,                            /* "DialupSlotInfo" */
  110.     kHomeNetAttrTypeNum            = 1012,                            /* "Home Internet" */
  111.     kCoResAttrTypeNum            = 1013,                            /* "Co-resident M&M" */
  112.     kFwdrLocalAttrTypeNum        = 1014,                            /* "FwdrLocalRecord" */
  113.     kConnectAttrTypeNum            = 1015,                            /* "Connected To" */
  114.     kForeignAttrTypeNum            = 1016,                            /* "Foreign RLIs" */
  115.     kOwnersAttrTypeNum            = 1017,                            /* "Owners" */
  116.     kReadListAttrTypeNum        = 1018,                            /* "ReadList" */
  117.     kWriteListAttrTypeNum        = 1019,                            /* "WriteList" */
  118.     kDescriptorAttrTypeNum        = 1020,                            /* "Descriptor" */
  119.     kCertificateAttrTypeNum        = 1021,                            /* "Certificate" */
  120.     kMsgQsAttrTypeNum            = 1022,                            /* "MessageQs" */
  121.     kPrefMsgQAttrTypeNum        = 1023,                            /* "PrefMessageQ" */
  122.     kMasterPFAttrTypeNum        = 1024,                            /* "MasterPF" */
  123.     kMasterNetSpecAttrTypeNum    = 1025,                            /* "MasterNetSpec" */
  124.     kServersOfAttrTypeNum        = 1026,                            /* "Servers Of" */
  125.     kParentCIDAttrTypeNum        = 1027,                            /* "Parent CID" */
  126.     kNetworkSpecAttrTypeNum        = 1028,                            /* "NetworkSpec" */
  127.     kLocationAttrTypeNum        = 1029,                            /* "Location" */
  128.     kTimeSvrTypeAttrTypeNum        = 1030,                            /* "TimeServer Type" */
  129.     kUpdateTimerAttrTypeNum        = 1031,                            /* "Update Timer" */
  130.     kShadowsOfAttrTypeNum        = 1032,                            /* "Shadows Of" */
  131.     kShadowServerAttrTypeNum    = 1033,                            /* "Shadow Server" */
  132.     kTBSetupAttrTypeNum            = 1034,                            /* "TB Setup" */
  133.     kMailSetupAttrTypeNum        = 1035,                            /* "Mail Setup" */
  134.     kSlotIDAttrTypeNum            = 1036,                            /* "SlotID" */
  135.     kGatewayFileIDAttrTypeNum    = 1037,                            /* "Gateway FileID" */
  136.     kMailServiceAttrTypeNum        = 1038,                            /* "Mail Service" */
  137.     kStdSlotInfoAttrTypeNum        = 1039,                            /* "Std Slot Info" */
  138.     kAssoDirectoryAttrTypeNum    = 1040,                            /* "Asso. Directory" */
  139.     kDirectoryAttrTypeNum        = 1041,                            /* "Directory" */
  140.     kDirectoriesAttrTypeNum        = 1042,                            /* "Directories" */
  141.     kSFlagsAttrTypeNum            = 1043,                            /* "SFlags" */
  142.     kLocalNameAttrTypeNum        = 1044,                            /* "Local Name" */
  143.     kLocalKeyAttrTypeNum        = 1045,                            /* "Local Key" */
  144.     kDirUserRIDAttrTypeNum        = 1046,                            /* "Dir User RID" */
  145.     kDirUserKeyAttrTypeNum        = 1047,                            /* "Dir User Key" */
  146.     kDirNativeNameAttrTypeNum    = 1048,                            /* "Dir Native Name" */
  147.     kCommentAttrTypeNum            = 1049,                            /* "Comment" */
  148.     kRealNameAttrTypeNum        = 1050,                            /* "Real Name" */
  149.     kPrivateDataAttrTypeNum        = 1051,                            /* "Private Data" */
  150.     kDirTypeAttrTypeNum            = 1052,                            /* "Directory Type" */
  151.     kDSAMFileAliasAttrTypeNum    = 1053,                            /* "DSAM File Alias" */
  152.     kCanAddressToAttrTypeNum    = 1054,                            /* "Can Address To" */
  153.     kDiscriminatorAttrTypeNum    = 1055,                            /* "Discriminator" */
  154.     kAliasAttrTypeNum            = 1056,                            /* "Alias" */
  155.     kParentMSAMAttrTypeNum        = 1057,                            /* "Parent MSAM" */
  156.     kParentDSAMAttrTypeNum        = 1058,                            /* "Parent DSAM" */
  157.     kSlotAttrTypeNum            = 1059,                            /* "Slot" */
  158.     kAssoMailServiceAttrTypeNum    = 1060,                            /* "Asso. Mail Service" */
  159.     kFakeAttrTypeNum            = 1061,                            /* "Fake" */
  160.     kInheritSysAdminAttrTypeNum    = 1062,                            /* "Inherit SysAdministrators" */
  161.     kPreferredPDAttrTypeNum        = 1063,                            /* "Preferred PD" */
  162.     kLastLoginAttrTypeNum        = 1064,                            /* "Last Login" */
  163.     kMailerAOMStateAttrTypeNum    = 1065,                            /* "Mailer AOM State" */
  164.     kMailerSendOptionsAttrTypeNum = 1066,                        /* "Mailer Send Options" */
  165.     kJoinedAttrTypeNum            = 1067,                            /* "Joined" */
  166.     kUnconfiguredAttrTypeNum    = 1068,                            /* "Unconfigured" */
  167.     kVersionAttrTypeNum            = 1069,                            /* "Version" */
  168.     kLocationNamesAttrTypeNum    = 1070,                            /* "Location Names" */
  169.     kActiveAttrTypeNum            = 1071,                            /* "Active" */
  170.     kDeleteRequestedAttrTypeNum    = 1072,                            /* "Delete Requested" */
  171.     kGatewayTypeAttrTypeNum        = 1073,                            /* "Gateway Type" */
  172.     kFirstOCEAttrTypeNum        = kMemberAttrTypeNum,            /* first standard OCE attr type */
  173.     kLastOCEAttrTypeNum            = kGatewayTypeAttrTypeNum,        /* last standard OCE attr type */
  174.     kNumOCEAttrTypes            = (kLastOCEAttrTypeNum - kFirstOCEAttrTypeNum + 1)
  175. };
  176.  
  177.  
  178. #endif /* REZ */
  179.  
  180. /* Standard definitions for certain record types: */
  181.  
  182. #define  kUserRecTypeBody             "aoce User"
  183. #define  kGroupRecTypeBody            "aoce Group"
  184. #define  kMnMRecTypeBody            "aoce AppleMail™ M&M"
  185. #define  kMnMForwarderRecTypeBody    "aoce AppleMail™ Fwdr"
  186. #define  kNetworkSpecRecTypeBody    "aoce NetworkSpec"
  187. #define  kADAPServerRecTypeBody        "aoce ADAP Server"
  188. #define  kADAPDNodeRecTypeBody        "aoce ADAP DNode"
  189. #define  kADAPDNodeRepRecTypeBody    "aoce ADAP DNode Rep"
  190. #define  kServerSetupRecTypeBody    "aoce Server Setup"
  191. #define  kDirectoryRecTypeBody        "aoce Directory"
  192. #define  kDNodeRecTypeBody            "aoce DNode"
  193. #define  kSetupRecTypeBody            "aoce Setup"
  194. #define  kMSAMRecTypeBody            "aoce MSAM"
  195. #define  kDSAMRecTypeBody            "aoce DSAM"
  196. #define  kAttributeValueRecTypeBody    "aoce Attribute Value"
  197. #define  kBusinessCardRecTypeBody    "aoce Business Card"
  198. #define  kMailServiceRecTypeBody    "aoce Mail Service"
  199. #define  kCombinedRecTypeBody        "aoce Combined"
  200. #define  kOtherServiceRecTypeBody    "aoce Other Service"
  201. #define  kAFPServiceRecTypeBody        "aoce Other Service afps"
  202.  
  203. /* Standard definitions for certain attribute types: */
  204.  
  205. #define  kMemberAttrTypeBody        "aoce Member"
  206. #define  kAdminsAttrTypeBody        "aoce Administrators"
  207. #define  kMailSlotsAttrTypeBody        "aoce mailslots"
  208. #define  kPrefMailAttrTypeBody        "aoce pref mailslot"
  209. #define  kAddressAttrTypeBody        "aoce Address"
  210. #define  kPictureAttrTypeBody        "aoce Picture"
  211. #define  kAuthKeyAttrTypeBody        "aoce auth key"
  212. #define  kTelephoneAttrTypeBody        "aoce Telephone"
  213. #define  kNBPNameAttrTypeBody        "aoce NBP Name"
  214. #define  kQMappingAttrTypeBody        "aoce ForwarderQMap"
  215. #define  kDialupSlotAttrTypeBody    "aoce DialupSlotInfo"
  216. #define  kHomeNetAttrTypeBody        "aoce Home Internet"
  217. #define  kCoResAttrTypeBody            "aoce Co-resident M&M"
  218. #define  kFwdrLocalAttrTypeBody        "aoce FwdrLocalRecord"
  219. #define  kConnectAttrTypeBody        "aoce Connected To"
  220. #define  kForeignAttrTypeBody        "aoce Foreign RLIs"
  221. #define  kOwnersAttrTypeBody        "aoce Owners"
  222. #define  kReadListAttrTypeBody        "aoce ReadList"
  223. #define  kWriteListAttrTypeBody        "aoce WriteList"
  224. #define  kDescriptorAttrTypeBody    "aoce Descriptor"
  225. #define  kCertificateAttrTypeBody    "aoce Certificate"
  226. #define  kMsgQsAttrTypeBody            "aoce MessageQs"
  227. #define  kPrefMsgQAttrTypeBody        "aoce PrefMessageQ"
  228. #define  kMasterPFAttrTypeBody        "aoce MasterPF"
  229. #define  kMasterNetSpecAttrTypeBody    "aoce MasterNetSpec"
  230. #define  kServersOfAttrTypeBody        "aoce Servers Of"
  231. #define  kParentCIDAttrTypeBody        "aoce Parent CID"
  232. #define  kNetworkSpecAttrTypeBody    "aoce NetworkSpec"
  233. #define  kLocationAttrTypeBody        "aoce Location"
  234. #define  kTimeSvrTypeAttrTypeBody    "aoce TimeServer Type"
  235. #define  kUpdateTimerAttrTypeBody    "aoce Update Timer"
  236. #define  kShadowsOfAttrTypeBody        "aoce Shadows Of"
  237. #define  kShadowServerAttrTypeBody    "aoce Shadow Server"
  238. #define  kTBSetupAttrTypeBody        "aoce TB Setup"
  239. #define  kMailSetupAttrTypeBody        "aoce Mail Setup"
  240. #define  kSlotIDAttrTypeBody        "aoce SlotID"
  241. #define  kGatewayFileIDAttrTypeBody    "aoce Gateway FileID"
  242. #define  kMailServiceAttrTypeBody    "aoce Mail Service"
  243. #define  kStdSlotInfoAttrTypeBody    "aoce Std Slot Info"
  244. #define  kAssoDirectoryAttrTypeBody    "aoce Asso. Directory"
  245. #define  kDirectoryAttrTypeBody        "aoce Directory"
  246. #define  kDirectoriesAttrTypeBody    "aoce Directories"
  247. #define  kSFlagsAttrTypeBody        "aoce SFlags"
  248. #define  kLocalNameAttrTypeBody        "aoce Local Name"
  249. #define  kLocalKeyAttrTypeBody        "aoce Local Key"
  250. #define  kDirUserRIDAttrTypeBody    "aoce Dir User RID"
  251. #define  kDirUserKeyAttrTypeBody    "aoce Dir User Key"
  252. #define  kDirNativeNameAttrTypeBody    "aoce Dir Native Name"
  253. #define  kCommentAttrTypeBody        "aoce Comment"
  254. #define  kRealNameAttrTypeBody        "aoce Real Name"
  255. #define  kPrivateDataAttrTypeBody    "aoce Private Data"
  256. #define  kDirTypeAttrTypeBody        "aoce Directory Type"
  257. #define  kDSAMFileAliasAttrTypeBody    "aoce DSAM File Alias"
  258. #define  kCanAddressToAttrTypeBody    "aoce Can Address To"
  259. #define  kDiscriminatorAttrTypeBody    "aoce Discriminator"
  260. #define  kAliasAttrTypeBody            "aoce Alias"
  261. #define  kParentMSAMAttrTypeBody    "aoce Parent MSAM"
  262. #define  kParentDSAMAttrTypeBody    "aoce Parent DSAM"
  263. #define  kSlotAttrTypeBody                "aoce Slot"
  264. #define  kAssoMailServiceAttrTypeBody     "aoce Asso. Mail Service"
  265. #define  kFakeAttrTypeBody                "aoce Fake"
  266. #define  kInheritSysAdminAttrTypeBody     "aoce Inherit SysAdministrators"
  267. #define  kPreferredPDAttrTypeBody        "aoce Preferred PD"
  268. #define  kLastLoginAttrTypeBody            "aoce Last Login"
  269. #define  kMailerAOMStateAttrTypeBody    "aoce Mailer AOM State"
  270. #define  kMailerSendOptionsAttrTypeBody "aoce Mailer Send Options"
  271. #define  kJoinedAttrTypeBody            "aoce Joined"
  272. #define  kUnconfiguredAttrTypeBody        "aoce Unconfigured"
  273. #define  kVersionAttrTypeBody            "aoce Version"
  274. #define  kLocationNamesAttrTypeBody        "aoce Location Names"
  275. #define  kActiveAttrTypeBody            "aoce Active"
  276. #define  kDeleteRequestedAttrTypeBody     "aoce Delete Requested"
  277. #define  kGatewayTypeAttrTypeBody         "aoce Gateway Type"
  278. #ifndef REZ
  279. /* Miscellaneous enums: */
  280.  
  281. enum {
  282.     kRString32Size                = 32,                            /* max size of the body field in RString32 */
  283.     kRString64Size                = 64,                            /* max size of the body field in RString64 */
  284.     kNetworkSpecMaxBytes        = 32,                            /* max size of the body field in NetworkSpec */
  285.     kPathNameMaxBytes            = 1024,                            /* max size of the data field in PackedPathName */
  286.     kDirectoryNameMaxBytes        = 32,                            /* max size of the body field in DirectoryName */
  287.     kAttributeTypeMaxBytes        = 32,                            /* max size of the body field in AttributeType */
  288.     kAttrValueMaxBytes            = 65536L,                        /* max size of any attribute value */
  289.     kRStringMaxBytes            = 256,                            /* max size (in bytes) of the body field of a recordName or recordType */
  290.     kRStringMaxChars            = 128                            /* max size (in chars) of the body field of a recordName or recordType */
  291. };
  292.  
  293.  
  294. enum {
  295.     kNULLDNodeNumber            = 0,                            /* Special value meaning none specified */
  296.     kRootDNodeNumber            = 2                                /* DNodeNum corresponding to the root of the tree */
  297. };
  298.  
  299.  
  300. /* This enum is used to select the kind of RString in calls such as OCERelRString,
  301. OCEEqualRString, and OCEValidRString.
  302.  
  303. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  304. use RStrings for things other than what you see in this file.  If you want them to
  305. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  306. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  307. insensitive manner (c = C = ç), use eGenericInensitive.
  308. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  309. names, entity names, pathname parts, entity types, network specs, or attribute
  310. types!  Don't assume that you know how they should be compared!!! */
  311.  
  312. enum {
  313.     kOCEDirName                    = 0,
  314.     kOCERecordOrDNodeName        = 1,
  315.     kOCERecordType                = 2,
  316.     kOCENetworkSpec                = 3,
  317.     kOCEAttrType                = 4,
  318.     kOCEGenericSensitive        = 5,
  319.     kOCEGenericInsensitive        = 6
  320. };
  321.  
  322. typedef unsigned short                     RStringKind;
  323. /* Values for the signature field in Discriminator */
  324.  
  325. enum {
  326.     kDirAllKinds                = 0,
  327.     kDirADAPKind                = FOUR_CHAR_CODE('adap'),
  328.     kDirPersonalDirectoryKind    = FOUR_CHAR_CODE('pdir'),
  329.     kDirDSAMKind                = FOUR_CHAR_CODE('dsam')
  330. };
  331.  
  332.  
  333. typedef unsigned long                     OCEDirectoryKind;
  334. /* Values returned by GetDSSpecInfo() */
  335.  
  336. enum {
  337.     kOCEInvalidDSSpec            = 0x3F3F3F3F,                    /* '????' could not be determined */
  338.     kOCEDirsRootDSSpec            = FOUR_CHAR_CODE('root'),        /* root of all catalogs ("Catalogs" icon) */
  339.     kOCEDirectoryDSSpec            = FOUR_CHAR_CODE('dire'),        /* catalog */
  340.     kOCEDNodeDSSpec                = FOUR_CHAR_CODE('dnod'),        /* d-node */
  341.     kOCERecordDSSpec            = FOUR_CHAR_CODE('reco'),        /* record */
  342.     kOCEentnDSSpec                = FOUR_CHAR_CODE('entn'),        /* extensionType is 'entn' */
  343.     kOCENOTentnDSSpec            = FOUR_CHAR_CODE('not ')        /* extensionType is not 'entn' */
  344. };
  345.  
  346.  
  347. /* Values for AttributeTag */
  348.  
  349. enum {
  350.     typeRString                    = FOUR_CHAR_CODE('rstr'),
  351.     typePackedDSSpec            = FOUR_CHAR_CODE('dspc'),
  352.     typeBinary                    = FOUR_CHAR_CODE('bnry')
  353. };
  354.  
  355.  
  356. /* Bit flag corresponding to the canContainRecords bit.  Use it like this:
  357.     if (foo & kCanContainRecords)
  358.         then this dNode can contain records!
  359. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  360. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  361. mail routers might be able to route to clusters beneath it. */
  362.  
  363. enum {
  364.     kCanContainRecordsBit        = 0,
  365.     kForeignNodeBit                = 1
  366. };
  367.  
  368. /* DirNodeKind */
  369.  
  370. enum {
  371.     kCanContainRecords            = 1L << kCanContainRecordsBit,
  372.     kForeignNode                = 1L << kForeignNodeBit
  373. };
  374.  
  375. typedef unsigned long                     DirNodeKind;
  376.  
  377.  
  378. /**** Toolbox Control ****/
  379. /* We will have a version number and attributes for toolboxes off the aa5e trap
  380. and the S&F server trap.
  381.  
  382. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  383. change to ONLY service ServerGateway calls —it will then be necessary to run
  384. it co–resident with an OCE toolbox].
  385.  
  386. The high order word will represent the S&F Server version number.  The low
  387. order word will represent the OCE toolbox version number.  These will be zero
  388. until the component is up and running.  It is not possible to know these
  389. a–priori. Note: there will not be a seperate version numbers for each component
  390. in the OCE toolbox or S&F server.
  391.  
  392. The above is consistent with the standard System 7.0 usage of Gestalt.
  393.  
  394. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  395. machine.
  396.  
  397. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  398.  
  399. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  400. available through the S&F server. This are essentially the server gateway calls.
  401.  
  402. Any (future) remaining OCE attributes may not be established correctly until
  403. the attribute gestaltOCETBAvailable is set.
  404.  
  405. */
  406.  
  407. /*    Constants used for Transitions. */
  408.  
  409. enum {
  410.     ATTransIPMStart                = FOUR_CHAR_CODE('ipms'),
  411.     ATTransIPMShutdown            = FOUR_CHAR_CODE('ipmd'),
  412.     ATTransDirStart                = FOUR_CHAR_CODE('dirs'),
  413.     ATTransDirShutdown            = FOUR_CHAR_CODE('dird'),
  414.     ATTransAuthStart            = FOUR_CHAR_CODE('auts'),
  415.     ATTransAuthShutdown            = FOUR_CHAR_CODE('autd'),
  416.     ATTransSFStart                = FOUR_CHAR_CODE('s&fs'),
  417.     ATTransSFShutdown            = FOUR_CHAR_CODE('s&fd')
  418. };
  419.  
  420.  
  421.  
  422. /* Some definitions for time-related parameters: */
  423. /* Interpreted as UTC seconds since 1/1/1904 */
  424. typedef unsigned long                     UTCTime;
  425. /* seconds EAST of Greenwich */
  426. typedef long                             UTCOffset;
  427. /* This is the same as the ScriptManager script. */
  428. typedef short                             CharacterSet;
  429. /**** RString ****/
  430.  
  431. /* struct RString is a maximum-sized structure.  Allocate one of these and it will
  432. hold any valid RString. */
  433.  
  434. struct RString {
  435.     CharacterSet                     charSet;
  436.     unsigned short                     dataLength;
  437.     Byte                             body[256];                    /* place for characters */
  438. };
  439. typedef struct RString                    RString;
  440. /* struct ProtoRString is a minimum-sized structure.  Use this for a variable-length RString. */
  441.  
  442. struct ProtoRString {
  443.     CharacterSet                     charSet;
  444.     unsigned short                     dataLength;
  445. };
  446. typedef struct ProtoRString                ProtoRString;
  447.  
  448. typedef RString *                        RStringPtr;
  449. typedef RStringPtr *                    RStringHandle;
  450. typedef ProtoRString *                    ProtoRStringPtr;
  451.  
  452. struct RString64 {
  453.     CharacterSet                     charSet;
  454.     unsigned short                     dataLength;
  455.     Byte                             body[64];
  456. };
  457. typedef struct RString64                RString64;
  458.  
  459. struct RString32 {
  460.     CharacterSet                     charSet;
  461.     unsigned short                     dataLength;
  462.     Byte                             body[32];
  463. };
  464. typedef struct RString32                RString32;
  465. /* Standard definitions for the entity type field and attribute type
  466. have been moved to the end of the file. */
  467.  
  468. /* Copies str1 to str2.  str2Length is the size of str2, excluding header.
  469. A memFull error will be returned if that is not as large as str1->dataLength. */
  470. EXTERN_API( OSErr )
  471. OCECopyRString                    (const RString *        str1,
  472.                                  RString *                str2,
  473.                                  unsigned short         str2Length)                            THREEWORDINLINE(0x303C, 0x0308, 0xAA5C);
  474.  
  475.  
  476. /*    Make an RString from a C string.  If the c string is bigger than rStrLength,
  477. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  478. EXTERN_API( void )
  479. OCECToRString                    (const char *            cStr,
  480.                                  CharacterSet             charSet,
  481.                                  RString *                rStr,
  482.                                  unsigned short         rStrLength)                            THREEWORDINLINE(0x303C, 0x0339, 0xAA5C);
  483.  
  484.  
  485. /*    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  486. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  487. EXTERN_API( void )
  488. OCEPToRString                    (ConstStr255Param         pStr,
  489.                                  CharacterSet             charSet,
  490.                                  RString *                rStr,
  491.                                  unsigned short         rStrLength)                            THREEWORDINLINE(0x303C, 0x033A, 0xAA5C);
  492.  
  493.  
  494. /*    Make a Pascal string from an RString.  It's up to you to check the char set of
  495. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  496. length will simply be the lower byte of the RString's length).  The StringPtr that is
  497. returned will point directly into the RString (no memory will be allocated). */
  498. EXTERN_API( StringPtr )
  499. OCERToPString                    (const RString *        rStr)                                THREEWORDINLINE(0x303C, 0x033B, 0xAA5C);
  500.  
  501. /*    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  502. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  503. (same as for RelString). */
  504. EXTERN_API( short )
  505. OCERelRString                    (const void *            str1,
  506.                                  const void *            str2,
  507.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x032D, 0xAA5C);
  508.  
  509.  
  510. /*    Check for equality of two RStrings. Returns true if equal. */
  511. EXTERN_API( Boolean )
  512. OCEEqualRString                    (const void *            str1,
  513.                                  const void *            str2,
  514.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x0316, 0xAA5C);
  515.  
  516.  
  517. /*    Check the validity of an RString.  Returns true if the RString is valid */
  518. EXTERN_API( Boolean )
  519. OCEValidRString                    (const void *            str,
  520.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x0338, 0xAA5C);
  521.  
  522.  
  523. /**** CreationID ****/
  524.  
  525. struct CreationID {
  526.     unsigned long                     source;                        /* Fields definitions and usage are not defined */
  527.     unsigned long                     seq;
  528. };
  529. typedef struct CreationID                CreationID;
  530.  
  531. typedef CreationID                         AttributeCreationID;
  532. typedef CreationID *                    CreationIDPtr;
  533.  
  534. /* Returns a pointer to a null CreationID . */
  535. EXTERN_API( const CreationID *)
  536. OCENullCID                        (void)                                                        THREEWORDINLINE(0x303C, 0x0344, 0xAA5C);
  537.  
  538.  
  539. /* Returns a pointer to a special CreationID used within the PathFinder. */
  540. EXTERN_API( const CreationID *)
  541. OCEPathFinderCID                (void)                                                        THREEWORDINLINE(0x303C, 0x033C, 0xAA5C);
  542.  
  543.  
  544. /* Sets the CreationID to a null value. */
  545. EXTERN_API( void )
  546. OCESetCreationIDtoNull            (CreationID *            cid)                                THREEWORDINLINE(0x303C, 0x032E, 0xAA5C);
  547.  
  548.  
  549. /* Copies the value of cid1 to cid2. */
  550. EXTERN_API( void )
  551. OCECopyCreationID                (const CreationID *        cid1,
  552.                                  CreationID *            cid2)                                THREEWORDINLINE(0x303C, 0x0300, 0xAA5C);
  553.  
  554.  
  555. /* Check the equality of two CreationIDs. */
  556. EXTERN_API( Boolean )
  557. OCEEqualCreationID                (const CreationID *        cid1,
  558.                                  const CreationID *        cid2)                                THREEWORDINLINE(0x303C, 0x030C, 0xAA5C);
  559.  
  560.  
  561. /**** NetworkSpec ****/
  562. /* For the record, a NetworkSpec is an RString with a smaller maximum size.
  563. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  564. struct to contain the max length.  But it should be possible to typecast any
  565. NetworkSpec to an RString and use all the RString utilities on it. */
  566.  
  567. struct NetworkSpec {
  568.     CharacterSet                     charSet;
  569.     unsigned short                     dataLength;
  570.     Byte                             body[32];                    /* always fixed at the max size */
  571. };
  572. typedef struct NetworkSpec                NetworkSpec;
  573. typedef NetworkSpec *                    NetworkSpecPtr;
  574.  
  575. /**** PackedPathName ****/
  576. /* struct PackedPathName is a maximum-sized structure.  Allocate one of
  577. these and it will hold any valid packed pathname. */
  578.  
  579. struct PackedPathName {
  580.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  581.     Byte                             data[1022];
  582. };
  583. typedef struct PackedPathName            PackedPathName;
  584. /* struct ProtoPackedPathName is a minimum-sized structure.  Use this
  585. for a variable-length packed PathName. */
  586.  
  587. struct ProtoPackedPathName {
  588.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  589.                                                                 /* Followed by data */
  590. };
  591. typedef struct ProtoPackedPathName        ProtoPackedPathName;
  592.  
  593. typedef PackedPathName *                PackedPathNamePtr;
  594. typedef ProtoPackedPathName *            ProtoPackedPathNamePtr;
  595. /*
  596. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  597. be large enough to hold a copy of path1.  A memFull error will be returned if that
  598. is not the case.
  599. */
  600. EXTERN_API( OSErr )
  601. OCECopyPackedPathName            (const PackedPathName *    path1,
  602.                                  PackedPathName *        path2,
  603.                                  unsigned short         path2Length)                        THREEWORDINLINE(0x303C, 0x0304, 0xAA5C);
  604.  
  605.  
  606. /*
  607. Returns true if packed path pointer is nil, or is of zero length, or is of
  608. length 2 and nParts of zero.
  609. */
  610. EXTERN_API( Boolean )
  611. OCEIsNullPackedPathName            (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x031D, 0xAA5C);
  612.  
  613.  
  614. /*
  615. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  616. pointers into the array 'parts', which the client asserts can hold as many as
  617. 'nParts' elements. The number of parts actually found is returned.  Strings are
  618. placed in the array in order from lowest to highest.  The first pathName element
  619. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  620. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  621. WITH THE UNPACKED STRUCT AS WELL
  622. */
  623. EXTERN_API( unsigned short )
  624. OCEUnpackPathName                (const PackedPathName *    path,
  625.                                  RString *const         parts[],
  626.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0330, 0xAA5C);
  627.  
  628. /*
  629. OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
  630. PackedPathName manufactured from the array of parts.  This length
  631. includes the length of the length field of PackedPathName, so it
  632. is safe to do a NewPtr (OCEPackedPathNameSize(...)).
  633. */
  634. EXTERN_API( unsigned short )
  635. OCEPackedPathNameSize            (const RStringPtr         parts[],
  636.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0328, 0xAA5C);
  637.  
  638. /* OCEDNodeNameCount returns the number of RStrings contained within the path. */
  639. EXTERN_API( unsigned short )
  640. OCEDNodeNameCount                (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x032C, 0xAA5C);
  641.  
  642.  
  643. /*
  644. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  645. large enough to hold the packed pathname.  A memFull error will be returned if
  646. pathLength is too small.  parts[0] should contain the deepest pathName element,
  647. and parts[nParts - 1] should contain the name of the first pathName element beneath
  648. the root. 
  649. */
  650. EXTERN_API( OSErr )
  651. OCEPackPathName                    (const RStringPtr         parts[],
  652.                                  unsigned short         nParts,
  653.                                  PackedPathName *        path,
  654.                                  unsigned short         pathLength)                            THREEWORDINLINE(0x303C, 0x0323, 0xAA5C);
  655.  
  656. /*
  657. Check the equality of two packed paths.
  658. */
  659. EXTERN_API( Boolean )
  660. OCEEqualPackedPathName            (const PackedPathName *    path1,
  661.                                  const PackedPathName *    path2)                                THREEWORDINLINE(0x303C, 0x0311, 0xAA5C);
  662.  
  663.  
  664. /*
  665. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  666. Returns true if it's ok.
  667. */
  668. EXTERN_API( Boolean )
  669. OCEValidPackedPathName            (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x0334, 0xAA5C);
  670.  
  671.  
  672. /**** DirDiscriminator ****/
  673.  
  674. struct DirDiscriminator {
  675.     OCEDirectoryKind                 signature;
  676.     unsigned long                     misc;
  677. };
  678. typedef struct DirDiscriminator            DirDiscriminator;
  679. /* Copies the value of disc1 to disc2. */
  680. EXTERN_API( void )
  681. OCECopyDirDiscriminator            (const DirDiscriminator * disc1,
  682.                                  DirDiscriminator *        disc2)                                THREEWORDINLINE(0x303C, 0x0301, 0xAA5C);
  683.  
  684.  
  685. /* Check the equality of two DirDiscriminators. */
  686. EXTERN_API( Boolean )
  687. OCEEqualDirDiscriminator        (const DirDiscriminator * disc1,
  688.                                  const DirDiscriminator * disc2)                            THREEWORDINLINE(0x303C, 0x030D, 0xAA5C);
  689.  
  690. /*
  691. This structure is called RLI because it really contains all the info you
  692. need to locate a record within the entire name space.  It contains four fields.
  693. The first two are the name of the catalog and a catalog discriminator.  These
  694. two fields are used to indicate to which catalog a given record belongs.  The
  695. discriminator is used to distinguish between two different catalogs that have
  696. the same name.
  697.  
  698. The other two fields in the RLI structure are used to indicate a particular
  699. catalog node within the catalog specified by the directoryName and
  700. discriminator fields.  These fields are exactly analagous to the dirID and
  701. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  702. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  703. or by a combination of the two.  The latter is called a 'partial pathname', and
  704. while it is valid in the Catalog Manager API, it is not supported by ADAP
  705. catalogs in Release 1.
  706.  
  707. Note that the path parameter does not include the catalog name, but holds
  708. the names of all the nodes on the path to the desired catalog node, starting
  709. with the catalog node and working its way up the tree.
  710. */
  711.  
  712. /**** RLI ****/
  713.  
  714.  
  715. struct DirectoryName {
  716.     CharacterSet                     charSet;
  717.     unsigned short                     dataLength;
  718.     Byte                             body[32];                    /* space for catalog name */
  719. };
  720. typedef struct DirectoryName            DirectoryName;
  721. typedef DirectoryName *                    DirectoryNamePtr;
  722. /* Catalog node number */
  723.  
  724. typedef unsigned long                     DNodeNum;
  725.  
  726. struct RLI {
  727.     DirectoryNamePtr                 directoryName;                /* pointer to the name of the catalog root */
  728.     DirDiscriminator                 discriminator;                /* used to discriminate between dup catalog names */
  729.     DNodeNum                         dNodeNumber;                /* number of the node */
  730.     PackedPathNamePtr                 path;                        /* old-style RLI */
  731. };
  732. typedef struct RLI                        RLI;
  733. typedef RLI *                            RLIPtr;
  734. /*
  735. Create a new RLI from the catalog name, discriminator, DNode number, and
  736. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  737. to it.
  738. */
  739. EXTERN_API( void )
  740. OCENewRLI                        (RLI *                    newRLI,
  741.                                  const DirectoryName *    dirName,
  742.                                  DirDiscriminator *        discriminator,
  743.                                  DNodeNum                 dNodeNumber,
  744.                                  const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x031F, 0xAA5C);
  745.  
  746.  
  747. /*
  748. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  749. simply copies the pointers to the catalog name and path, wiping out any pointer
  750. that you might have had in there.
  751. */
  752. EXTERN_API( void )
  753. OCEDuplicateRLI                    (const RLI *            rli1,
  754.                                  RLI *                    rli2)                                THREEWORDINLINE(0x303C, 0x030B, 0xAA5C);
  755.  
  756.  
  757. /*
  758. Copy the contents of rli1 to rli2.  rli2 must already contain
  759. pointers to structures large enough to hold copies of the corresponding
  760. fields from rli1.  A memFull error will be returned if that is not the case.
  761. So if you allocate a brand new empty destination, you must at least set up
  762. its length fields.
  763. */
  764. EXTERN_API( OSErr )
  765. OCECopyRLI                        (const RLI *            rli1,
  766.                                  RLI *                    rli2)                                THREEWORDINLINE(0x303C, 0x0307, 0xAA5C);
  767.  
  768.  
  769. /*
  770. Check the equality of two RLIs.  This will take into account differences
  771. in the case and diacriticals of the directoryName and the PathName.
  772. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  773. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  774. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  775. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  776. kRootDNodeNumber will be treated as equal.
  777. */
  778. EXTERN_API( Boolean )
  779. OCEEqualRLI                        (const RLI *            rli1,
  780.                                  const RLI *            rli2)                                THREEWORDINLINE(0x303C, 0x0315, 0xAA5C);
  781.  
  782.  
  783. /*
  784. Check the validity of an RLI.  This checks that the catalog name length
  785. is within bounds, and the packed pathname (if specified) is valid.
  786. */
  787. EXTERN_API( Boolean )
  788. OCEValidRLI                        (const RLI *            theRLI)                                THREEWORDINLINE(0x303C, 0x0337, 0xAA5C);
  789.  
  790. /**** PackedRLI ****/
  791. /*
  792. struct PackedRLI is a maximum-sized structure.  Allocate one of
  793. these and it will hold any valid packed pathname.
  794. */
  795.  
  796. enum {
  797.     kRLIMaxBytes                = (sizeof(RString) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kPathNameMaxBytes)
  798. };
  799.  
  800.  
  801. struct PackedRLI {
  802.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  803.     Byte                             data[1296];
  804. };
  805. typedef struct PackedRLI                PackedRLI;
  806. /*
  807. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  808. for a variable-length packed RLI.
  809. */
  810.  
  811. struct ProtoPackedRLI {
  812.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  813.                                                                 /* Followed by data */
  814. };
  815. typedef struct ProtoPackedRLI            ProtoPackedRLI;
  816.  
  817. typedef PackedRLI *                        PackedRLIPtr;
  818. typedef ProtoPackedRLI *                ProtoPackedRLIPtr;
  819. /*
  820. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  821. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  822. is not the case.
  823. */
  824. EXTERN_API( OSErr )
  825. OCECopyPackedRLI                (const PackedRLI *        prli1,
  826.                                  PackedRLI *            prli2,
  827.                                  unsigned short         prli2Length)                        THREEWORDINLINE(0x303C, 0x0305, 0xAA5C);
  828.  
  829.  
  830. /*
  831. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  832. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  833. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  834. WITH THE UNPACKED STRUCT AS WELL
  835. */
  836. EXTERN_API( void )
  837. OCEUnpackRLI                    (const PackedRLI *        prli,
  838.                                  RLI *                    theRLI)                                THREEWORDINLINE(0x303C, 0x0331, 0xAA5C);
  839.  
  840.  
  841. /*
  842. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  843. PackedRLI manufactured from an RLI.  This length
  844. includes the length of the length field of PackedRLI, so it
  845. is safe to do a NewPtr (OCEPackedRLISize(...)).
  846. */
  847. EXTERN_API( unsigned short )
  848. OCEPackedRLISize                (const RLI *            theRLI)                                THREEWORDINLINE(0x303C, 0x032A, 0xAA5C);
  849.  
  850.  
  851. /*
  852. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  853. large enough to hold the packed RLI.  A memFull error will be returned if
  854. prliLength is too small.
  855. */
  856. EXTERN_API( OSErr )
  857. OCEPackRLI                        (const RLI *            theRLI,
  858.                                  PackedRLI *            prli,
  859.                                  unsigned short         prliLength)                            THREEWORDINLINE(0x303C, 0x0324, 0xAA5C);
  860.  
  861.  
  862. /*
  863. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  864. PackedRLI manufactured from the parts of an RLI.  This length
  865. includes the length of the length field of PackedRLI, so it
  866. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  867. */
  868. EXTERN_API( unsigned short )
  869. OCEPackedRLIPartsSize            (const DirectoryName *    dirName,
  870.                                  const RStringPtr         parts[],
  871.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0329, 0xAA5C);
  872.  
  873. /*
  874. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  875. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  876. if prliLength is too small.
  877. */
  878. EXTERN_API( OSErr )
  879. OCEPackRLIParts                    (const DirectoryName *    dirName,
  880.                                  const DirDiscriminator * discriminator,
  881.                                  DNodeNum                 dNodeNumber,
  882.                                  const RStringPtr         parts[],
  883.                                  unsigned short         nParts,
  884.                                  PackedRLI *            prli,
  885.                                  unsigned short         prliLength)                            THREEWORDINLINE(0x303C, 0x0325, 0xAA5C);
  886.  
  887. /*
  888. Check the equality of two packed prlis.
  889. */
  890. EXTERN_API( Boolean )
  891. OCEEqualPackedRLI                (const PackedRLI *        prli1,
  892.                                  const PackedRLI *        prli2)                                THREEWORDINLINE(0x303C, 0x0313, 0xAA5C);
  893.  
  894.  
  895. /*
  896. Check the validity of a packed RLI.  This checks that the catalog name length
  897. is within bounds, and the packed pathname (if specified) is valid.
  898. */
  899. EXTERN_API( Boolean )
  900. OCEValidPackedRLI                (const PackedRLI *        prli)                                THREEWORDINLINE(0x303C, 0x0336, 0xAA5C);
  901.  
  902. /*
  903. If this packed RLI describes a Personal Catalog, this call will return a pointer
  904. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  905. */
  906. EXTERN_API( AliasPtr )
  907. OCEExtractAlias                    (const PackedRLI *        prli)                                THREEWORDINLINE(0x303C, 0x0318, 0xAA5C);
  908.  
  909. /*
  910. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  911. the root of all catalogs.  It is used in the CollabPack.
  912. */
  913. EXTERN_API( const PackedRLI *)
  914. OCEGetDirectoryRootPackedRLI    (void)                                                        THREEWORDINLINE(0x303C, 0x0346, 0xAA5C);
  915.  
  916. /**** LocalRecordID ****/
  917.  
  918. struct LocalRecordID {
  919.     CreationID                         cid;
  920.     RStringPtr                         recordName;
  921.     RStringPtr                         recordType;
  922. };
  923. typedef struct LocalRecordID            LocalRecordID;
  924. typedef LocalRecordID *                    LocalRecordIDPtr;
  925. /* Create a LocalRecordID from a name, type, and CreationID */
  926. EXTERN_API( void )
  927. OCENewLocalRecordID                (const RString *        recordName,
  928.                                  const RString *        recordType,
  929.                                  const CreationID *        cid,
  930.                                  LocalRecordID *        lRID)                                THREEWORDINLINE(0x303C, 0x031E, 0xAA5C);
  931.  
  932. /*
  933. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  934. pointers to RString structures large enough to hold copies of the corresponding
  935. fields from lRID1.  A memFull error will be returned if that is not the case.
  936. So if you allocate a brand new empty destination, you must at least set up
  937. its length field.
  938. */
  939. EXTERN_API( OSErr )
  940. OCECopyLocalRecordID            (const LocalRecordID *    lRID1,
  941.                                  LocalRecordID *        lRID2)                                THREEWORDINLINE(0x303C, 0x0302, 0xAA5C);
  942.  
  943.  
  944. /*
  945. Check the equality of two local RIDs.
  946. */
  947. EXTERN_API( Boolean )
  948. OCEEqualLocalRecordID            (const LocalRecordID *    lRID1,
  949.                                  const LocalRecordID *    lRID2)                                THREEWORDINLINE(0x303C, 0x030F, 0xAA5C);
  950.  
  951. /**** ShortRecordID ****/
  952.  
  953. struct ShortRecordID {
  954.     PackedRLIPtr                     rli;
  955.     CreationID                         cid;
  956. };
  957. typedef struct ShortRecordID            ShortRecordID;
  958. typedef ShortRecordID *                    ShortRecordIDPtr;
  959. /* Create a ShortRecordID from an RLI struct and a CreationID */
  960. EXTERN_API( void )
  961. OCENewShortRecordID                (const PackedRLI *        theRLI,
  962.                                  const CreationID *        cid,
  963.                                  ShortRecordIDPtr         sRID)                                THREEWORDINLINE(0x303C, 0x0321, 0xAA5C);
  964.  
  965.  
  966. /*
  967. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  968. pointers to structures large enough to hold copies of the corresponding
  969. fields from sRID1.  A memFull error will be returned if that is not the case.
  970. So if you allocate a brand new empty destination, you must at least set up
  971. its length fields.
  972. */
  973. EXTERN_API( OSErr )
  974. OCECopyShortRecordID            (const ShortRecordID *    sRID1,
  975.                                  ShortRecordID *        sRID2)                                THREEWORDINLINE(0x303C, 0x030A, 0xAA5C);
  976.  
  977.  
  978. /*
  979. Check the equality of two short RIDs.
  980. */
  981. EXTERN_API( Boolean )
  982. OCEEqualShortRecordID            (const ShortRecordID *    sRID1,
  983.                                  const ShortRecordID *    sRID2)                                THREEWORDINLINE(0x303C, 0x0317, 0xAA5C);
  984.  
  985. /**** RecordID ****/
  986.  
  987. struct RecordID {
  988.     PackedRLIPtr                     rli;                        /* pointer to a packed rli structure */
  989.     LocalRecordID                     local;
  990. };
  991. typedef struct RecordID                    RecordID;
  992. typedef RecordID *                        RecordIDPtr;
  993. /*    Create a RecordID from a packed RLI struct and a LocalRecordID.
  994. This doesn't allocate any new space; the RecordID points to the same
  995. packed RLI struct and the same name and type RStrings. */
  996. EXTERN_API( void )
  997. OCENewRecordID                    (const PackedRLI *        theRLI,
  998.                                  const LocalRecordID *    lRID,
  999.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x0320, 0xAA5C);
  1000.  
  1001.  
  1002. /*
  1003. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  1004. pointers to structures large enough to hold copies of the corresponding
  1005. fields from lRID1.  A memFull error will be returned if that is not the case.
  1006. So if you allocate a brand new empty destination, you must at least set up
  1007. its length fields.
  1008. */
  1009. EXTERN_API( OSErr )
  1010. OCECopyRecordID                    (const RecordID *        rid1,
  1011.                                  const RecordID *        rid2)                                THREEWORDINLINE(0x303C, 0x0309, 0xAA5C);
  1012.  
  1013.  
  1014. /*    Check the equality of two RIDs. */
  1015. EXTERN_API( Boolean )
  1016. OCEEqualRecordID                (const RecordID *        rid1,
  1017.                                  const RecordID *        rid2)                                THREEWORDINLINE(0x303C, 0x0314, 0xAA5C);
  1018.  
  1019.  
  1020. /**** PackedRecordID ****/
  1021. /*
  1022. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  1023. these and it will hold any valid packed RecordID.
  1024. */
  1025.  
  1026. enum {
  1027.     kPackedRecordIDMaxBytes        = (kPathNameMaxBytes + sizeof(DNodeNum) + sizeof(DirDiscriminator) + sizeof(CreationID) + (3 * sizeof(RString)))
  1028. };
  1029.  
  1030.  
  1031. struct PackedRecordID {
  1032.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1033.     Byte                             data[1824];
  1034. };
  1035. typedef struct PackedRecordID            PackedRecordID;
  1036. /*
  1037. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  1038. for a variable-length packed RecordID.
  1039. */
  1040.  
  1041. struct ProtoPackedRecordID {
  1042.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1043.                                                                 /* Followed by data */
  1044. };
  1045. typedef struct ProtoPackedRecordID        ProtoPackedRecordID;
  1046.  
  1047. typedef PackedRecordID *                PackedRecordIDPtr;
  1048. typedef ProtoPackedRecordID *            ProtoPackedRecordIDPtr;
  1049. /*
  1050. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  1051. pointers to structures large enough to hold copies of the corresponding
  1052. fields from pRID1.  A memFull error will be returned if that is not the case.
  1053. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  1054. packed RecordID header.
  1055. */
  1056. EXTERN_API( OSErr )
  1057. OCECopyPackedRecordID            (const PackedRecordID *    pRID1,
  1058.                                  const PackedRecordID *    pRID2,
  1059.                                  unsigned short         pRID2Length)                        THREEWORDINLINE(0x303C, 0x0306, 0xAA5C);
  1060.  
  1061.  
  1062. /*
  1063. Create a RecordID from a PackedRecordID.
  1064. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1065. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  1066. */
  1067. EXTERN_API( void )
  1068. OCEUnpackRecordID                (const PackedRecordID *    pRID,
  1069.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x0332, 0xAA5C);
  1070.  
  1071.  
  1072. /*
  1073. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  1074. the packed RecordID.  A memFull error will be returned if that is not the case.
  1075. packedRecordIDLength is the number of bytes that can be put into pRID, not
  1076. counting the header.
  1077. */
  1078. EXTERN_API( OSErr )
  1079. OCEPackRecordID                    (const RecordID *        rid,
  1080.                                  PackedRecordID *        pRID,
  1081.                                  unsigned short         packedRecordIDLength)                THREEWORDINLINE(0x303C, 0x0326, 0xAA5C);
  1082.  
  1083.  
  1084. /*
  1085. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  1086. length includes the length of the length field of PackedRecordID, so it
  1087. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  1088. */
  1089. EXTERN_API( unsigned short )
  1090. OCEPackedRecordIDSize            (const RecordID *        rid)                                THREEWORDINLINE(0x303C, 0x032B, 0xAA5C);
  1091.  
  1092.  
  1093. /*
  1094. Check the equality of two packed RIDs.
  1095. */
  1096. EXTERN_API( Boolean )
  1097. OCEEqualPackedRecordID            (const PackedRecordID *    pRID1,
  1098.                                  const PackedRecordID *    pRID2)                                THREEWORDINLINE(0x303C, 0x0312, 0xAA5C);
  1099.  
  1100.  
  1101. /* OCEValidPackedRecordID checks the validity of a packed record ID. */
  1102. EXTERN_API( Boolean )
  1103. OCEValidPackedRecordID            (const PackedRecordID *    pRID)                                THREEWORDINLINE(0x303C, 0x0335, 0xAA5C);
  1104.  
  1105.  
  1106. /**** DSSpec ****/
  1107.  
  1108. struct DSSpec {
  1109.     RecordID *                        entitySpecifier;
  1110.     OSType                             extensionType;
  1111.     unsigned short                     extensionSize;
  1112.     void *                            extensionValue;
  1113. };
  1114. typedef struct DSSpec                    DSSpec;
  1115. typedef DSSpec *                        DSSpecPtr;
  1116. /*
  1117. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  1118. these and it will hold any valid packed RecordID, but not necessarily any additional
  1119. data.
  1120. */
  1121.  
  1122.  
  1123. enum {
  1124.     kPackedDSSpecMaxBytes        = (sizeof(PackedRecordID) + sizeof(OSType) + sizeof(UInt16))
  1125. };
  1126.  
  1127.  
  1128. struct PackedDSSpec {
  1129.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1130.     Byte                             data[1832];
  1131. };
  1132. typedef struct PackedDSSpec                PackedDSSpec;
  1133. typedef PackedDSSpec *                    PackedDSSpecPtr;
  1134. typedef PackedDSSpecPtr *                PackedDSSpecHandle;
  1135. /*
  1136. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  1137. for a variable-length packed DSSpec.
  1138. */
  1139.  
  1140. struct ProtoPackedDSSpec {
  1141.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1142.                                                                 /* Followed by data */
  1143. };
  1144. typedef struct ProtoPackedDSSpec        ProtoPackedDSSpec;
  1145. typedef ProtoPackedDSSpec *                ProtoPackedDSSpecPtr;
  1146. /*
  1147. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1148. pointers to structures large enough to hold copies of the corresponding
  1149. fields from pdss1.  A memFull error will be returned if that is not the case.
  1150. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1151. packed DSSpec header.
  1152. */
  1153. EXTERN_API( OSErr )
  1154. OCECopyPackedDSSpec                (const PackedDSSpec *    pdss1,
  1155.                                  const PackedDSSpec *    pdss2,
  1156.                                  unsigned short         pdss2Length)                        THREEWORDINLINE(0x303C, 0x0303, 0xAA5C);
  1157.  
  1158.  
  1159. /*
  1160. Create a DSSpec from a PackedDSSpec.
  1161. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1162. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1163. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1164. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1165. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1166. into dss, and set dss->entitySpecifier to rid.
  1167. */
  1168. EXTERN_API( void )
  1169. OCEUnpackDSSpec                    (const PackedDSSpec *    pdss,
  1170.                                  DSSpec *                dss,
  1171.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x032F, 0xAA5C);
  1172.  
  1173.  
  1174. /*
  1175. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1176. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1177. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1178. not counting the header.
  1179. */
  1180. EXTERN_API( OSErr )
  1181. OCEPackDSSpec                    (const DSSpec *            dss,
  1182.                                  PackedDSSpec *            pdss,
  1183.                                  unsigned short         pdssLength)                            THREEWORDINLINE(0x303C, 0x0322, 0xAA5C);
  1184.  
  1185.  
  1186. /*
  1187. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1188. length includes the length of the length field of PackedDSSpec, so it
  1189. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1190. */
  1191. EXTERN_API( unsigned short )
  1192. OCEPackedDSSpecSize                (const DSSpec *            dss)                                THREEWORDINLINE(0x303C, 0x0327, 0xAA5C);
  1193.  
  1194.  
  1195. /*    Check the equality of two DSSpecs.  This compares all fields, even the
  1196. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1197. diacrit-insensitive manner. */
  1198. EXTERN_API( Boolean )
  1199. OCEEqualDSSpec                    (const DSSpec *            pdss1,
  1200.                                  const DSSpec *            pdss2)                                THREEWORDINLINE(0x303C, 0x030E, 0xAA5C);
  1201.  
  1202.  
  1203. /*    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1204. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1205. diacrit-insensitive manner. */
  1206. EXTERN_API( Boolean )
  1207. OCEEqualPackedDSSpec            (const PackedDSSpec *    pdss1,
  1208.                                  const PackedDSSpec *    pdss2)                                THREEWORDINLINE(0x303C, 0x0310, 0xAA5C);
  1209.  
  1210.  
  1211. /*
  1212. Check the validity of a PackedDSSpec.  If extensionType is
  1213. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1214. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1215. is made on the extension.
  1216. */
  1217. EXTERN_API( Boolean )
  1218. OCEValidPackedDSSpec            (const PackedDSSpec *    pdss)                                THREEWORDINLINE(0x303C, 0x0333, 0xAA5C);
  1219.  
  1220.  
  1221. /*
  1222. Return info about a DSSpec.  This routine does not check validity.  If the
  1223. DSSpec has no extension, we determine whether it represents the root of all
  1224. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1225. If the DSSpec has an extension, we simply return the extension type.
  1226. */
  1227. EXTERN_API( OSType )
  1228. OCEGetDSSpecInfo                (const DSSpec *            spec)                                THREEWORDINLINE(0x303C, 0x0319, 0xAA5C);
  1229.  
  1230.  
  1231. /* OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. */
  1232. EXTERN_API( OSType )
  1233. OCEGetExtensionType                (const PackedDSSpec *    pdss)                                THREEWORDINLINE(0x303C, 0x031C, 0xAA5C);
  1234.  
  1235. /*
  1236. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1237. calling the DSSpecStreamer routine that you provide.
  1238. */
  1239. typedef CALLBACK_API( OSErr , DSSpecStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
  1240. typedef STACK_UPP_TYPE(DSSpecStreamerProcPtr)                     DSSpecStreamerUPP;
  1241. enum { uppDSSpecStreamerProcInfo = 0x000037E0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
  1242. #define NewDSSpecStreamerProc(userRoutine)                         (DSSpecStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSSpecStreamerProcInfo, GetCurrentArchitecture())
  1243. #define CallDSSpecStreamerProc(userRoutine, buffer, count, eof, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDSSpecStreamerProcInfo, (buffer), (count), (eof), (userData))
  1244.  
  1245. typedef DSSpecStreamerUPP                 DSSpecStreamer;
  1246. EXTERN_API( OSErr )
  1247. OCEStreamPackedDSSpec            (const DSSpec *            dss,
  1248.                                  DSSpecStreamer         stream,
  1249.                                  long                     userData,
  1250.                                  unsigned long *        actualCount)                        THREEWORDINLINE(0x303C, 0x033D, 0xAA5C);
  1251.  
  1252. /**** AttributeType ****/
  1253. /*
  1254. For the record, an AttributeType is an RString with a smaller maximum size.
  1255. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1256. struct to contain the max length, because I need to include it in the Attribute struct
  1257. below.  But it should be possible to typecast any AttributeType to an RString and use
  1258. all the RString utilities on it.
  1259. */
  1260.  
  1261. struct AttributeType {
  1262.     CharacterSet                     charSet;
  1263.     unsigned short                     dataLength;
  1264.     Byte                             body[32];                    /* always fixed at the max size */
  1265. };
  1266. typedef struct AttributeType            AttributeType;
  1267. typedef AttributeType *                    AttributeTypePtr;
  1268. /* Miscellaneous defines:  (these cannot be made into enums) */
  1269.  
  1270. enum {
  1271.     kMinPackedRStringLength        = (sizeof(ProtoRString))
  1272. };
  1273.  
  1274.  
  1275. enum {
  1276.     kMinPackedRLISize            = (sizeof(ProtoPackedRLI) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kMinPackedRStringLength + sizeof(ProtoPackedPathName))
  1277. };
  1278.  
  1279. /**** AttributeValue ****/
  1280. /* same class as is used in AppleEvents */
  1281.  
  1282. typedef DescType                         AttributeTag;
  1283.  
  1284. struct AttributeValue {
  1285.     AttributeTag                     tag;
  1286.     unsigned long                     dataLength;
  1287.     void *                            bytes;
  1288. };
  1289. typedef struct AttributeValue            AttributeValue;
  1290. typedef AttributeValue *                AttributeValuePtr;
  1291. /**** Attribute ****/
  1292.  
  1293. struct Attribute {
  1294.     AttributeType                     attributeType;
  1295.     AttributeCreationID             cid;
  1296.     AttributeValue                     value;
  1297. };
  1298. typedef struct Attribute                Attribute;
  1299. typedef Attribute *                        AttributePtr;
  1300. EXTERN_API( RString *)
  1301. OCEGetIndRecordType                (OCERecordTypeIndex     stringIndex)                        THREEWORDINLINE(0x303C, 0x031B, 0xAA5C);
  1302.  
  1303. EXTERN_API( AttributeType *)
  1304. OCEGetIndAttributeType            (OCEAttributeTypeIndex     stringIndex)                        THREEWORDINLINE(0x303C, 0x031A, 0xAA5C);
  1305.  
  1306.  
  1307. enum {
  1308.     _oceTBDispatch                = 0xAA5E
  1309. };
  1310.  
  1311. /****************************************************************************************
  1312.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1313.  
  1314.    OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
  1315.    OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
  1316.    The OCEMessaging header includes the OCE header, so no changes to your code are
  1317.    required.
  1318.  
  1319. ****************************************************************************************/
  1320.  
  1321. typedef DSSpec                             OCERecipient;
  1322.  
  1323. enum {
  1324.     kOCESizePackedRecipient        = 830,
  1325.     kOCEPackRecipient            = 831,
  1326.     kOCEUnpackRecipient            = 832,
  1327.     kOCEStreamRecipient            = 833,
  1328.     kOCEGetRecipientType        = 834,
  1329.     kOCESetRecipientType        = 835
  1330. };
  1331.  
  1332. /*
  1333. Compute the space that a OCERecipient would take if it were in packed
  1334. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1335. Safe to pass dereferenced handle(s).
  1336. */
  1337. EXTERN_API( unsigned short )
  1338. OCESizePackedRecipient            (const OCERecipient *    rcpt)                                THREEWORDINLINE(0x303C, 0x033E, 0xAA5C);
  1339.  
  1340.  
  1341. /*
  1342. Take an OCERecipient (scatter) and (gather) stream into the specified
  1343. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1344. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1345. */
  1346. EXTERN_API( unsigned short )
  1347. OCEPackRecipient                (const OCERecipient *    rcpt,
  1348.                                  void *                    buffer)                                THREEWORDINLINE(0x303C, 0x033F, 0xAA5C);
  1349.  
  1350. /*
  1351. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1352. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1353. handle(s).
  1354. */
  1355. EXTERN_API( OSErr )
  1356. OCEUnpackRecipient                (const void *            buffer,
  1357.                                  OCERecipient *            rcpt,
  1358.                                  RecordID *                entitySpecifier)                    THREEWORDINLINE(0x303C, 0x0340, 0xAA5C);
  1359.  
  1360. /*
  1361. Take an OCERecipient (scatter) and (gather) stream using the specified
  1362. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1363. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1364. */
  1365. typedef CALLBACK_API( OSErr , OCERecipientStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
  1366. typedef STACK_UPP_TYPE(OCERecipientStreamerProcPtr)             OCERecipientStreamerUPP;
  1367. enum { uppOCERecipientStreamerProcInfo = 0x000037E0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
  1368. #define NewOCERecipientStreamerProc(userRoutine)                 (OCERecipientStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOCERecipientStreamerProcInfo, GetCurrentArchitecture())
  1369. #define CallOCERecipientStreamerProc(userRoutine, buffer, count, eof, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppOCERecipientStreamerProcInfo, (buffer), (count), (eof), (userData))
  1370. typedef OCERecipientStreamerUPP         OCERecipientStreamer;
  1371. EXTERN_API( OSErr )
  1372. OCEStreamRecipient                (const OCERecipient *    rcpt,
  1373.                                  OCERecipientStreamer     stream,
  1374.                                  long                     userData,
  1375.                                  unsigned long *        actualCount)                        THREEWORDINLINE(0x303C, 0x0341, 0xAA5C);
  1376.  
  1377. /* Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).*/
  1378. EXTERN_API( OSType )
  1379. OCEGetRecipientType                (const CreationID *        cid)                                THREEWORDINLINE(0x303C, 0x0342, 0xAA5C);
  1380.  
  1381.  
  1382. /*
  1383. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1384. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1385. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1386. routine must and will zero the high long (source) of the cid! Safe to pass
  1387. dereferenced handle(s).
  1388. */
  1389. EXTERN_API( void )
  1390. OCESetRecipientType                (OSType                 extensionType,
  1391.                                  CreationID *            cid)                                THREEWORDINLINE(0x303C, 0x0343, 0xAA5C);
  1392.  
  1393. /****************************************************************************************
  1394.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1395.  
  1396.    OCEGetAccessControlDSSpec and its corresponding data type and constants have
  1397.    moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
  1398.    header, so no changes to your code are required.
  1399.    
  1400. ****************************************************************************************/
  1401. /* access categories bit numbers */
  1402.  
  1403. enum {
  1404.     kThisRecordOwnerBit            = 0,
  1405.     kFriendsBit                    = 1,
  1406.     kAuthenticatedInDNodeBit    = 2,
  1407.     kAuthenticatedInDirectoryBit = 3,
  1408.     kGuestBit                    = 4,
  1409.     kMeBit                        = 5
  1410. };
  1411.  
  1412. /* Values of CategoryMask */
  1413.  
  1414. enum {
  1415.     kThisRecordOwnerMask        = 1,
  1416.     kFriendsMask                = 2,
  1417.     kAuthenticatedInDNodeMask    = 4,
  1418.     kAuthenticatedInDirectoryMask = 8,
  1419.     kGuestMask                    = 16,
  1420.     kMeMask                        = 32
  1421. };
  1422.  
  1423. typedef unsigned long                     CategoryMask;
  1424. /*
  1425. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  1426. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  1427. DSSpec that can be used in the Get or Set Access Controls calls.
  1428. */
  1429. EXTERN_API( DSSpec *)
  1430. OCEGetAccessControlDSSpec        (CategoryMask             categoryBitMask)                    THREEWORDINLINE(0x303C, 0x0345, 0xAA5C);
  1431.  
  1432.  
  1433.  
  1434.  
  1435. #endif /* REZ */
  1436.  
  1437. #if PRAGMA_STRUCT_ALIGN
  1438.     #pragma options align=reset
  1439. #elif PRAGMA_STRUCT_PACKPUSH
  1440.     #pragma pack(pop)
  1441. #elif PRAGMA_STRUCT_PACK
  1442.     #pragma pack()
  1443. #endif
  1444.  
  1445. #ifdef PRAGMA_IMPORT_OFF
  1446. #pragma import off
  1447. #elif PRAGMA_IMPORT
  1448. #pragma import reset
  1449. #endif
  1450.  
  1451. #ifdef __cplusplus
  1452. }
  1453. #endif
  1454.  
  1455. #endif /* __OCE__ */
  1456.  
  1457.